<?php

namespace app\controller\v1;

use app\service\ShopService;
use think\Request;
class ShopController extends BaseAPIController
{
    
    public function getShopInfo(Request $request)
    {
        $service = new ShopService();
        $shop = $service->getShopInfo($this->request->get('shop_id'));
        return $this->success($shop);
    }

    public function getShopProduct(Request $request)
    {
        $service = new ShopService();
        $shop = $service->getShopProduct($this->request->get(''));
        return $this->success($shop);
    }

    // 取消关注、关注店铺
    public function toggleFollow(Request $request)
    {
        $service = new ShopService();
        $shop = $service->toggleFollow($this->request->get('shop_id'));
        return $this->success($shop);
    }

    // 获取评价
    public function getShopReviews(Request $request)
    {
        $service = new ShopService();
        $shop = $service->getShopReviews($this->request->get('shop_id'));
        return $this->success($shop);
    }
}
